<!DOCTYPE html>
<!--<html lang="en" xmlns:th="http://www.thymeleaf.org">-->
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <script type="text/javascript" src='/js/jquery-1.4.2.js'></script>
    <script type="text/javascript" src='/js/jquery-1.7.2.min.js'></script>
    <script>
        function searchMember() {
            debugger;
            var id = $("#id").val();
            alert(id);
            $.ajax({
                url: "/user/login",
                method: "post",
                data: {
                    memberId: id
                },
                dataType: "json",
                success: function(data) {
                    if (data.status == "success") {
                        alert(1);
                        $("#name").html(data.name);
                        $("#sex").html(data.sex);
                        $("#telephone").html(data.telephone);
                    }
                },
                error: function(data) {
                    alert("wrong");
                }
            });
        }
    </script>
</head>
<body>
<div>
    欢迎光临1！<button onclick="searchMember()">测试</button>
    <input id="id" type="hidden" value="1">
    姓名：<input id="name" type="text">
    性别：<input id="sex" type="text">
    电话：<input id="telephone" type="text">
</div>

<!--<form action='/user/getUser/' method='post' id="form">
<div class="login">
&lt;!&ndash;    <p class="loginTittle">登录</p>&ndash;&gt;
    <span class="loginspan"> 帐号 </span>
    <input type="text" id="username" name="username" value="输入你的帐号"/>
    <span></span>&lt;!&ndash;装一个√或×，提示是否输入正确&ndash;&gt;
    <br />
            &lt;!&ndash;<span>0</span><br />&ndash;&gt;&lt;!&ndash;帐号是否正确输入的状态字&ndash;&gt;
            &lt;!&ndash;<img class="xbtn" src="" />&ndash;&gt;
    <span class="loginspan"> 密码 </span>
    <input type="password" id="password" name="password" />
    <span></span>
    <br />

    <input type="submit" value="登   录" onsubmit="login()"/>
</div>
</form>-->

<!--<form th:action="@{/user/login}" th:object="${userInfo}" method="post">-->
<!--    <p>用户名：<input type="text" th:field="*{username}" /></p>-->
<!--    <p>密  码：<input type="text" th:field="*{password}" /></p>-->
<!--    <input type="submit" />-->
<!--</form>-->
</body>
</html>
